import java.awt.Point;

public abstract class MapObject {

	private Point position;

	private long id = -1;

	public MapObject(Point p) {
		setPosition(p);

	}

	public abstract MapObjectType getType();

	public Point getPosition() {
		return position;
	}

	public void setPosition(Point position) {
		this.position = position;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof MapObject) {
			MapObject wo = (MapObject) obj;
			return (wo.getType()==getType() && wo.getId() == getId());
		} else {
			return false;
		}
	}
}
